package com.itheima.arraylistdemo;

import java.util.ArrayList;

public class ArrayListDemo {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("aaa");
        list.add("bbb");
        list.add("ccc");
        list.add("ddd");
        System.out.println(list);
       // boolean result = list.remove("aaa");
        /*System.out.println(list);
        System.out.println(result);*/
        /*String s = list.remove(2);
        System.out.println(list);
        System.out.println(s);*/
        String s = list.get(0);
       // System.out.println(s);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
        System.out.println(list.size());
    }
}
